﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.HandInvoice.Dto
{
    /// <summary>
    /// 查询条件
    /// </summary>
    public class SearchPTYDTO
    {
        public List<WhereCondition> conditions { get; set; }
        public PYTPage page { get; set; }

        public List<Sort> sorts { get; set; }
    }

    /// <summary>
    /// 分页
    /// </summary>
    public class PYTPage
    {

        public int pageNo { get; set; }
        public int pageSize { get; set; }
    }

    /// <summary>
    /// 排序
    /// </summary>
    public class Sort
    {
        public string field { get; set; } = "dateIssued";
        public string value { get; set; } = "desc";
    }



    public class SearchPytResultDto
    {
        public string code { get; set; }
        public string message { get; set; }
        public DataListResult result { get; set; }

        public List<ErrorDate> errors { get; set; }
    }


    public class ErrorDate
    {
        public string code { get; set; }
        public string message { get; set; }
    }

    public class DataListResult
    {

        public List<PytResultData> data { get; set; }
        public int total { get; set; }
        public int pageNo { get; set; }
        public int pageSize { get; set; }
    }

    public class PytResultData
    {
        /// <summary>
        /// 业务单号
        /// </summary>
        public string bizOrderNo { get; set; }
        /// <summary>
        /// 发票 id
        /// </summary>
        public string invoiceId { get; set; }
        /// <summary>
        /// 预制发票 id
        /// </summary>
        public string preInvoiceId { get; set; }
        /// <summary>
        /// 发票代码
        /// </summary>
        public string invoiceCode { get; set; }
        /// <summary>
        /// 发票号码
        /// </summary>
        public string invoiceNo { get; set; }
        /// <summary>
        /// 发票红蓝标识
        /// </summary>
        public string invoiceColor { get; set; }
        /// <summary>
        /// 发票来源
        /// </summary>
        public string invoiceSource { get; set; }
        /// <summary>
        /// 开票日期
        /// </summary>
        public string dateIssued { get; set; }
        /// <summary>
        /// 电子签名
        /// </summary>
        public string electronicSignature { get; set; }
        /// <summary>
        /// 系统来源
        /// </summary>
        public string source { get; set; }
        /// <summary>
        /// 渠道
        /// </summary>
        public string channel { get; set; }
        /// <summary>
        /// 国税发票来源
        /// </summary>
        public string taxInvoiceSource { get; set; }
        /// <summary>
        /// 发票类型
        /// </summary>
        public string invoiceType { get; set; }
        /// <summary>
        /// 销方编号
        /// </summary>
        public string sellerNo { get; set; }
        /// <summary>
        /// 销方名称
        /// </summary>
        public string sellerName { get; set; }
        /// <summary>
        /// 销方税号
        /// </summary>
        public string sellerTaxNo { get; set; }
        /// <summary>
        /// 销方电话
        /// </summary>
        public string sellerTel { get; set; }
        /// <summary>
        /// 销方地址
        /// </summary>
        public string sellerAddress { get; set; }
        /// <summary>
        /// 销方地址信息
        /// </summary>
        public string sellerAddressTel { get; set; }
        /// <summary>
        /// 销方银行账号
        /// </summary>
        public string sellerBankAccount { get; set; }
        /// <summary>
        /// 销方银行名称
        /// </summary>
        public string sellerBankName { get; set; }
        /// <summary>
        /// 销方银行信息
        /// </summary>
        public string sellerBankInfo { get; set; }
        /// <summary>
        /// 购方编号
        /// </summary>
        public string buyerNo { get; set; }
        /// <summary>
        /// 购方名称
        /// </summary>
        public string buyerName { get; set; }
        /// <summary>
        /// 购方税号
        /// </summary>
        public string buyerTaxNo { get; set; }
        /// <summary>
        /// 购方电话
        /// </summary>
        public string buyerTel { get; set; }
        /// <summary>
        /// 购方地址
        /// </summary>
        public string buyerAddress { get; set; }
        /// <summary>
        /// 购方地址信息
        /// </summary>
        public string buyereAddressTel { get; set; }
        /// <summary>
        /// 购方银行账号
        /// </summary>
        public string buyerBankAccount { get; set; }
        /// <summary>
        /// 购方银行名称
        /// </summary>
        public string buyerBankName { get; set; }
        /// <summary>
        /// 购方银行信息
        /// </summary>
        public string buyerBankInfo { get; set; }
        /// <summary>
        /// 购方电子支付标识
        /// </summary>
        public string buyerEPayId { get; set; }
        /// <summary>
        /// 含税金额
        /// </summary>
        public string amountWithTax { get; set; }
        /// <summary>
        /// 不含税金额
        /// </summary>
        public string amountWithoutTax { get; set; }
        /// <summary>
        /// 税额
        /// </summary>
        public string taxAmount { get; set; }
        /// <summary>
        /// 税率
        /// </summary>
        public string taxRate { get; set; }
        /// <summary>
        /// 复核人
        /// </summary>
        public string reviewer { get; set; }
        /// <summary>
        /// 收款人
        /// </summary>
        public string payee { get; set; }
        /// <summary>
        /// 开票人
        /// </summary>
        public string issuer { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 原始发票号码
        /// </summary>
        public string originalInvoiceNo { get; set; }
        /// <summary>
        /// 原始发票代码
        /// </summary>
        public string originalInvoiceCode { get; set; }
        /// <summary>
        /// 原发票类型
        /// </summary>
        public string originalInvoiceType { get; set; }
        /// <summary>
        /// 原蓝票开票日期
        /// </summary>
        public string originalDateIssued { get; set; }
        /// <summary>
        /// 红字信息编号
        /// </summary>
        public string redLetterNumber { get; set; }
        /// <summary>
        /// 红冲时间
        /// </summary>
        public string reverseTime { get; set; }
        /// <summary>
        /// 红冲状态
        /// </summary>
        public string reverseFlag { get; set; }
        /// <summary>
        /// 红冲人
        /// </summary>
        public string reverser { get; set; }
        /// <summary>
        /// 打印状态
        /// </summary>
        public string printStatus { get; set; }
        /// <summary>
        /// 销货清单文件打印标识
        /// </summary>
        public string saleListFileFlag { get; set; }
        /// <summary>
        /// 打印标识（单价和数量）
        /// </summary>
        public string printContentFlag { get; set; }
        /// <summary>
        /// PDF文件地址
        /// </summary>
        public string pdfUrl { get; set; }
        /// <summary>
        /// OFD文件地址
        /// </summary>
        public string ofdUrl { get; set; }
        /// <summary>
        /// 预览地址
        /// </summary>
        public string viewUrl { get; set; }
        /// <summary>
        /// 全电地址
        /// </summary>
        public string xmlUrl { get; set; }
        /// <summary>
        /// QR二维码地址
        /// </summary>
        public string qrCodeUrl { get; set; }
        /// <summary>
        /// 业务单业务状态
        /// </summary>
        public string status { get; set; }
        /// <summary>
        /// 作废时间
        /// </summary>
        public string cancellationTime { get; set; }
        /// <summary>
        /// 作废人
        /// </summary>
        public string cancellationUser { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public string createTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string createUser { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public string updateTime { get; set; }
        /// <summary>
        /// 更新人
        /// </summary>
        public string updateUser { get; set; }
        /// <summary>
        /// 全电行业发票样式
        /// </summary>
        public string invoiceStyleType { get; set; }

    }

    public class WhereCondition
    {
        //条件操作符
        public string conditionOP { get; set; }
        //属性值
        public string field { get; set; }
        //单值
        public string value { get; set; }
        //单值
        public List<string> values { get; set; }
    }
}
